package org.quickjsf.jsf.listener;

import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;

import org.apache.log4j.Logger;

public class LogPhaseListener implements PhaseListener {
	/**
	 * 
	 */
	private static final long serialVersionUID = 4499273109617189904L;
	
	private static Logger logger = Logger.getLogger(LogPhaseListener.class);

	@Override
	public void afterPhase(PhaseEvent event) {
		logger.info("-----------------------exec after:" + event.getPhaseId() + "-----------------------");
	}

	@Override
	public void beforePhase(PhaseEvent event) {
		logger.info("-----------------------exec before:" + event.getPhaseId() + "-----------------------");
	}

	@Override
	public PhaseId getPhaseId() {
		return PhaseId.ANY_PHASE;
	}

}
